package com.yun.zf.common.admin.model.pact;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class PactInfoMo {

    @ApiModelProperty(value = "合同号id")
    private String pactId;
    @ApiModelProperty(value = "交易类型,1租赁，2买卖")
    private String transactionType;
    @ApiModelProperty(value = "订单id")
    private String orderId;
    @ApiModelProperty(value = "合同类型，默认电子合同")
    private String pactType;
    @ApiModelProperty(value = "合同模板编号")
    private String pactTemp;
    @ApiModelProperty(value = "房源编号")
    private String houseId;
    @ApiModelProperty(value = "订单金额")
    private BigDecimal amount;
    @ApiModelProperty(value = "签约经纪人编号")
    private int signAgent;
    @ApiModelProperty(value = "签约经纪名称")
    private String signName;
    @ApiModelProperty(value = "经纪人部门id")
    private Long deptId;
    @ApiModelProperty(value = "经纪人部门名称")
    private String deptName;
    @ApiModelProperty(value = "成交价")
    private BigDecimal finalPrice;
    @ApiModelProperty(value = "单位")
    private String priceUnit;
    @ApiModelProperty(value = "房源地址")
    private String address;
    @ApiModelProperty(value = "城市名称")
    private String cityName;
    @ApiModelProperty(value = "区域名称")
    private String regionName;
    @ApiModelProperty(value = "街道名称")
    private String streetName;
    @ApiModelProperty(value = "面积")
    private BigDecimal area;
    @ApiModelProperty(value = "产证类型")
    private int  certType;
    @ApiModelProperty(value = "产证编号")
    private String certNumber;
    @ApiModelProperty(value = "业主")
    private String owner;
    @ApiModelProperty(value = "是否抵押1是2否")
    private int isDy; // 是否抵押1是2否

    private String transactionName;
    private String pactName;

    public String getTransactionName() {
        String name="";
        if ("1".equals(transactionType)){
            name= "租赁";
        }
        else  if ("2".equals(transactionType)){
            name= "买卖";
        }
        return  name;
    }

    public String getPactName() {
        String name="";
        if ("E".equals(pactType)){
            name= "电子合同";
        }
        else  if ("Z".equals(pactType)){
            name= "纸质合同";
        }
        return  name;
    }
}
